FROM java:8
VOLUME /tmp
ADD target/*.jar app.jar

ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN bash -c 'touch /app.jar'

CMD java -Djava.security.egd=file:/dev/./urandom -Dfile.encoding=utf-8 -server -jar /app.jar